package system.entity;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;

@Table(name = "sys_permission")
@Data
public class SysPermission implements Serializable {
    /**
     * 权限标识
     */
    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "权限标识")
    private String id;

    /**
     * 权限名称
     */
    @Column(name = "name")
    @ApiModelProperty(value = "权限名称")
    private String name;

    /**
     * 父级ID
     */
    @Column(name = "pid")
    @ApiModelProperty(value = "父级ID")
    private String pid;

    /**
     * 排序
     */
    @Column(name = "order_num")
    @ApiModelProperty(value = "排序")
    private Integer orderNum;

    /**
     * 是否禁用,0:正常,1:禁用
     */
    @Column(name = "is_disabled")
    @ApiModelProperty(value = "是否禁用,0:正常,1:禁用")
    private Integer isDisabled;

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", pid=").append(pid);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", isDisabled=").append(isDisabled);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}